package cn.tedu.csmall.stock.webapi.quartz.kafka;


import cn.tedu.csmall.commons.pojo.stock.entity.Stock;
import cn.tedu.csmall.stock.webapi.quartz.QuartzJob;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class Consumer {

//    @KafkaListener(topics = QuartzJob.TOPIC_STOCK_KEY)
//    public void received(ConsumerRecord<String,String> record){
//        String json=record.value();
//        Gson gson=new Gson();
//        Stock stock=gson.fromJson(json,Stock.class);
//        log.info("接收消息成功,内容是:{}",stock);
//    }


}
